package com.xyht.sca_s.student_manage_system.modules.produtProcurement.controller;


import com.xyht.sca_s.student_manage_system.common.commonReturn.ResponseResult;
import com.xyht.sca_s.student_manage_system.common.desEncodeAndDecode.annotation.SecretBody;
import com.xyht.sca_s.student_manage_system.modules.produtProcurement.entity.dto.SmsProductProcurementProcessDto;
import com.xyht.sca_s.student_manage_system.modules.produtProcurement.service.SmsProductProcurementApprovalProcessService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 大宗商品审批流程表 前端控制器
 * </p>
 *
 * @author XYHT
 * @since 2023-05-22
 */
@RestController
@RequestMapping("/produtProcurement/process")
@SecretBody
public class SmsProductProcurementApprovalProcessController {

    @Resource
    private SmsProductProcurementApprovalProcessService approvalProcessService;

    @ApiModelProperty("修改流程")
    @PostMapping("/update")
    public ResponseResult updateProductProcess(@RequestBody SmsProductProcurementProcessDto processDto){
        return approvalProcessService.updateProductProcess(processDto);
    }

    @ApiModelProperty("流程列表")
    @GetMapping("/list")
    public ResponseResult getProductProcessList(){
        return approvalProcessService.getProductProcessList();
    }
}

